#ifndef __H_EVENTLOOP_H__
#define __H_EVENTLOOP_H__
#include "Public.h"

namespace liu
{
	class Channel;
	class Epoller;

	class Eventloop
	{
	public:
		using Functor = function<void()>;
		using VEC_CHANNEL_PTR = vector<Channel*>;

	public:
		Eventloop();
		~Eventloop();

		void UpdateChannel(Channel* pChannel);

	public:
		void Loop();

	private:
		unique_ptr<Epoller>		m_unipEpoller;
		VEC_CHANNEL_PTR			m_vecActiveChannels;
	};

}
#endif // __H_EVENTLOOP_H__